<script setup>
import { ref } from "vue";
import { getUserCollectAPI } from "@/api/user";
import { HouseList } from "@/components/HouseList";
import { onLoad } from "@dcloudio/uni-app";
import { useMemberStore } from "@/stores";
const memberStore = useMemberStore();
const houseList = ref([]);

onLoad(async () => {
  await getUserCollectAPI(memberStore.profile.id).then((res) => {
    houseList.value = res.data;
  });
});
</script>

<template>
  <HouseList v-if="houseList" :houseList="houseList" />
  <view style="margin:auto;font-size=48rpx" v-else>暂无收藏房源</view>
</template>

<style scoped lang="scss"></style>
